package org.cli.admin.plugin;

import java.util.Set;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.inject.Inject;

public class PluginManager {
	
	private static final Logger logger = LoggerFactory.getLogger(PluginManager.class);
	
	@Inject
	private Set<IPlugin> plugins;
	
	public void prepare() {
		
		for ( IPlugin plugin : getPlugins() ) {
			plugin.prepare();
			
			logger.info("Plugin " + plugin.getPluginName() + " prepared.");
		}
	}

	public Set<IPlugin> getPlugins() {
		return plugins;
	}
}
